﻿namespace Common.Interfaces;

/// <summary>
/// 结果响应
/// </summary>
public interface IResult
{
    /// <summary>
    /// 是否成功
    /// </summary>
    bool Success { get; init; }
    /// <summary>
    /// 状态码
    /// </summary>
    int Code { get; set; }
    /// <summary>
    /// 提示信息
    /// </summary>
    string Message { get; set; }
}

/// <summary>
/// 响应数据
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IResult<out T> : IResult
{
    /// <summary>
    /// 返回数据
    /// </summary>
    T? Data { get; }
}
